// 导入request.js
import request from "@/utils/request";

// 获取部门列表,request是axios对象
export const getDeptList = () => request.get("/depts");

export const saveDept = (dept) => request.post("/depts", dept);

//根据id查询
export const queryDeptById = (id) => request.get(`/depts/${id}`);

//修改部门
export const updateDept = (data) => request.put(`/depts`, data);

export const deleteById = (id) => request.delete(`/depts?id=${id}`);
